home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Getting Started / MPW Development / MPW Additions / INTO Interfaces&Libraries / Cyberdog SDK / PublicIncludes / CyberDownloadExtension.idl < prev    next >
Encoding:
Text File  |  1996-08-02  |  2.7 KB  |  93 lines  |  [TEXT/MPS ]

  1. #ifndef __CYBERDOWNLOADEXTENSION__
  2. #define __CYBERDOWNLOADEXTENSION__
  3.  
  4. #include "CyberExtension.idl"
  5. #include "CyberMisc.idl"
  6.  
  7. //==============================================================================
  8. // Classes defined in this interface
  9. //==============================================================================
  10.  
  11. interface  CyberDownloadExtension;
  12.  
  13.  
  14. //==============================================================================
  15. // Classes used by this interface
  16. //==============================================================================
  17.  
  18. interface      CyberItem;
  19. interface    ODFrame;
  20. interface     ODPart;
  21.  
  22.  
  23. //==============================================================================
  24. // Types
  25. //==============================================================================
  26.  
  27. #pragma somemittypes off
  28. typedef somToken    CyberDownloadCompletionUPP;
  29.  
  30. #pragma somemittypes on
  31. typedef long                CDDownloadRequestID;
  32. const CDDownloadRequestID     kCDAllDownloadRequests = -1;
  33.  
  34. //==============================================================================
  35. // DownloadExtension
  36. //==============================================================================
  37.  
  38.  
  39. interface CyberDownloadExtension : CyberExtension
  40. {
  41.     /*---------------------------------------------------------------------
  42.     // two ways of posting download requests
  43.     //    call as many of these as you like as many times as you like
  44.     -----------------------------------------------------------------------*/
  45.         
  46.     CDDownloadRequestID        DownloadCyberItem(in CyberItem item, in FSSpecPtr spec);
  47.                                                                     
  48.     CDDownloadRequestID        PostDownloadRequest(
  49.                                 in CyberItem                 item,
  50.                                 in FSSpecPtr                 destSpec,
  51.                                 in ODBoolean                 decomp,
  52.                                 in CyberDownloadCompletionUPP    completionProc,
  53.                                 in Ptr                            completionProcData);
  54.  
  55.     
  56.     /*---------------------------------------------------------------------
  57.     // call this to cancel one or all requests
  58.     //  id= kCDAllDownloadRequests means cancel all requests
  59.     -----------------------------------------------------------------------*/
  60.  
  61.     void            CancelRequest(in CDDownloadRequestID id);
  62.  
  63.     /*---------------------------------------------------------------------
  64.     // call this after specifying what to download, 
  65.     // it opens the window (if wanted) and gets thing going
  66.     -----------------------------------------------------------------------*/
  67.         
  68.     void            StartDownloads(in ODBoolean openWindow);
  69.         
  70.  
  71. #ifdef __SOMIDL__
  72.     implementation
  73.     {
  74.       functionprefix = CyberDownloadExtension__;
  75.  
  76.     releaseorder:
  77.         DownloadCyberItem,
  78.         PostDownloadRequest,
  79.         CancelRequest,
  80.         StartDownloads,
  81.         
  82.             
  83.     majorversion = 1; minorversion = 0;
  84.  
  85.     passthru C_xh =     ""
  86.                         "#include \"CyberdogProcPtrs.h\""
  87.                         "";
  88.     };
  89. #endif //__SOMIDL__
  90. };
  91.  
  92. #endif // __CYBERDOWNLOADEXTENSION__
  93.